package prvydevj;

import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.parsers.ParserConfigurationException;
import org.basex.core.BaseXException;

/**
 *
 * @author tmcurda
 */
public class Main {

    /**
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            InvoiceManager invoiceManager = new InvoiceManager();
            invoiceManager.Connect("resources/database.xml");
            
            Transaction transaction = new Transaction(1, new Date(2012, 02, 02), new Date(2012, 03, 02), "00001/0100", true);
            transaction.setOrganisation("Petr Novak", "55555", "11111", "Praha", "Zelena", "70501");
            
            invoiceManager.addTransaction(transaction);
            
            invoiceManager.printAll();
            
        } catch (BaseXException | DatatypeConfigurationException | ParserConfigurationException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
}
